package com.edu;

import com.edu.annotation.SpringBootApplication;
import com.edu.core.SpringApplication;
import com.edu.service.MainServiceImpl;
import org.springframework.context.ApplicationContext;


@SpringBootApplication
public class Main {


    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(Main.class);
        String[] beanNames = applicationContext.getBeanDefinitionNames();
        for(String beanName: beanNames){
            System.out.println("****" + beanName);
        }
        System.out.println("-------------------***********------------------");
        MainServiceImpl bService = applicationContext.getBean( MainServiceImpl.class);
        bService.bmethod();

    }
}
